'use strict'

function roleRouting($stateProvider){
    $stateProvider.state('role', {
        url: "/",
        template: require('./role.html'),
        controller: 'RoleController as role',
        resolve: {
            loadRoleController: ($q, $ocLazyLoad) => {
                return $q((resolve) => {
                    require.ensure([], () => {
                        let module = require('./role.index');
                        $ocLazyLoad.load({name: module.name});
                        resolve(module.controller);
                    })
                });
            }
        }
    });
}

export default angular.module('role.routing', []).config(roleRouting).name;